package com.example.demo.myThread;

public class TestThread {

    public static void main(String[] args) throws InterruptedException {
        Thread t = new Thread(()->{
            System.out.println(1);
            try {
               Thread.sleep(4000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        });
        System.out.println(t.getState());
        t.start();
        System.out.println(t.getState());
        Thread.sleep(1000);
        System.out.println(t.getState());
    }
}
